import request from '@/config/axios'

export interface CourseBlankingVO {
  id: number
  workTaskNumber: string
  productNumber: string
  productName: string
  modelSpecification: string
  orderQuantity: number
  code: string
  partNumber: string
  partName: string
  drawingNumber: string
  partSpecification: string
  material: string
  specification: string
  planBeginDate: localdate
  planEndDate: localdate
  netSizeLength: number
  netSizeWidth: number
  cuttingSizeLength: number
  cuttingSizeWidth: number
  planQuantity: number
  reportQuantity: number
  completeQuantity: number
  differenceQuantity: number
  productionTeam: string
  deviceName: string
  deviceCode: string
  operator: string
  jobNumber: string
  dictStatus: number
  processPrice: number
  dictBaitingType: number
  dictIsMachining: number
  dictMachiningProcess: number
  creatorName: string
  dictCuttingProcess: number
}

// 查询工资核算-工时管理-安装与调试列表
export const getInstallationCommissioningPage = async (params) => {
  return await request.get({ url: `/salary/accounting-man-hour-manage/install/page`, params })
}

// 查询生产管理-过程管理-下料管理详情
export const getCourseBlanking = async (id: number) => {
  return await request.get({ url: `/produce/course-blanking/get?id=` + id })
}

// 新增生产管理-过程管理-下料管理
export const createCourseBlanking = async (data: CourseBlankingVO) => {
  return await request.post({ url: `/produce/course-blanking/create`, data })
}

// 修改生产管理-过程管理-下料管理
export const updateCourseBlanking = async (data: CourseBlankingVO) => {
  return await request.put({ url: `/produce/course-blanking/update`, data })
}

// 删除生产管理-过程管理-下料管理
export const deleteCourseBlanking = async (id: number) => {
  return await request.delete({ url: `/produce/course-blanking/delete?id=` + id })
}

// 导出工资核算-工时管理-安装与调试 Excel
export const exportInstallationCommissioning = async (params) => {
  return await request.download({ url: `/salary/accounting-man-hour-manage/install/export-excel`, params })
}
